/* This file replicates the results reported in 

Thomas Pl�mper and Eric Neumayer:

The Unequal Burden of War
The Effect of Armed Conflict on the Gender Gap in Life Expectancy

forthcoming in International Organization

All directory paths should be changed to your local settings.
Our analyses were conducted with Stata 8.0, version 30Jan2003.
The do-file should run on later versions of Stata, but we cannot provide updates of either the data or the do-file.
Note that the bootstrap procedure randomizes samples. Results of your replication can thus differ from those reported in our article.

The replication of our models requires the xtfevd.ado version 1.1. 
The ado is added to this do file (see the estimator appendix below). 
Please safe the program appendix of this do file as xtfevd.ado into your   >     Stata/ado/base/x     <   folder. 
The ado is also available from tpluem@essex.ac.uk

We used original data from the following sources:

US Census (www.census.gov/ipc/www/publist.html)
Prio (see Strand 2004)
State Failure Project (www.cidcm.umd.edu/inscr/stfail)
Polity  ((www.cidcm.umd.edu/inscr/polity)
World Bank: World Development Indicators CD-Rom 2004
EM-DAT (www.em-dat.net/index.html)
UNDP    (www.undp.org)
Fearon and Laitin  

*/


*_____________________________________________________________________________________________________________________________________________________-





set more off
 
*MODEL 1
xtfevd e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flallwarsdummyextended aids10, invariant(disaster internationalwardummy flallwarsdummyextended aids10) 

*MODEL 2
xtfevd e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flallwarsdummyextended if aids10==0, invariant(disaster internationalwardummy flallwarsdummyextended) 

*MODEL 3
xtfevd e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10) 

*(w/o aids10 countries, not reported)
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended if aids10==0, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended) 

*MODEL 4
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy   flcivildummyextended_inter  flcivildummyextended_noninter flethnicdummyextended_noninter flethnicdummyextended_inter aids10, invariant(disaster internationalwardummy flcivildummyextended_inter  flcivildummyextended_noninter flethnicdummyextended_noninter flethnicdummyextended_inter aids10 labfem ) 



*Hausman test
est clear
xtreg e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flallwarsdummyextended aids10, fe
est store fe1
xtreg e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flallwarsdummyextended aids10
hausman fe1
est clear 


*JACKKNIFE

xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 

xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode>99, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10) 
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<100 | ccode>199, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<200 | ccode>325, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<339 | ccode>373, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<400 | ccode>499, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 
*xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<500 | ccode>599, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<600 | ccode>699, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<700 | ccode>850, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended  aids10) 
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 if ccode<850, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10) 



*BOOTSTRAP

*model 1
xtfevd e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flallwarsdummyextended aids10, invariant(disaster internationalwardummy flallwarsdummyextended aids10) 
bootstrap `"reg e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flallwarsdummyextended aids10 eta"'  _b, reps(1000) dots

*model 3
xtfevd e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10, invariant(disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10) 
bootstrap `"reg e0fm e0fm_l1 e0b_d1  gdpc autoc durable litrate labfem disaster internationalwardummy flcivildummyextended flethnicdummyextended aids10 eta"'  _b, reps(1000) dots




*model 4
xtfevd e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy   flcivildummyextended_inter  flcivildummyextended_noninter flethnicdummyextended_noninter flethnicdummyextended_inter aids10, invariant(disaster internationalwardummy flcivildummyextended_inter  flcivildummyextended_noninter flethnicdummyextended_noninter flethnicdummyextended_inter aids10)  
*xtreg e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy   flcivildummyextended_inter  flcivildummyextended_noninter flethnicdummyextended_noninter flethnicdummyextended_inter aids10 eta  
bootstrap `"reg e0fm e0fm_l1 e0b_d1 gdpc autoc durable litrate labfem disaster internationalwardummy   flcivildummyextended_inter  flcivildummyextended_noninter flethnicdummyextended_noninter flethnicdummyextended_inter aids10 eta, robust"'  _b, reps(1000) dots


*NOTE: due to the random generation of the sample in the bootstrap, results reported in the article may not be exactly replicable.


